<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        .con{
            width: 300px;
            height: 350px;
            background-color: rgb(190, 190, 190);
            box-sizing: border-box;
            overflow: hidden;
            margin: 100px auto;
        }
        .t1{
            width: 55px;
            height: 55px;
            background-color: rgb(7, 7, 7);
            float: left;
            margin: 10px;
           
        }
        .t2{
            width: 280px;
            height: 100px;
            background-color: rgb(7, 7, 7);
            float: left; 
            margin: 10px;
        }
        .t2 p{
             line-height: 100px;
        }
        p{
            font-size: 20px;
            color: #fff;
            text-align: center;
            width: 100%;
            height: 100%;
            cursor: pointer;
        }
        .current{
            background-color: #fff;
            border: 1px solid red;
            color: #000;
        }
    </style>
</head>
<body>
    <div class="con">
        <div class="t1"><p>1  &nbsp;JUE</p></div>
        <div class="t1"><p>2  &nbsp;FEB</p></div>
        <div class="t1"><p>3  MAR</p></div>
        <div class="t1"><p>4  APR</p></div>
        <div class="t1"><p>5  MAY</p></div>
        <div class="t1"><p>6  JAN</p></div>
        <div class="t1"><p>7  &nbsp;JUL</p></div>
        <div class="t1"><p>8  AGU</p></div>
        <div class="t1"><p>9  &nbsp;SEP</p></div>
        <div class="t1"><p>10  OCT</p></div>
        <div class="t1"><p>11  NOV</p></div>
        <div class="t1"><p>12  DEC</p></div>
        <div class="t2"><p> </p></div>
    </div>
    <script>
        var arr = ['元旦节','情人节','妇女节','愚人节','劳动节','儿童节','国际建筑日','建军节','中国教师节','中华人民共和国国庆节','消防宣传日','圣诞节'];
        var s1 = document.querySelectorAll('.t1 p');
         var lis1 = document.querySelector('.t2 p');
         for (var i = 0; i < s1.length; i++) {
            s1[i].index = i;
            console.log(s1[i]);
            s1[i].onclick = function() {
                lis1.innerHTML = arr[this.index];
                for (var j = 0; j < s1.length; j++) {
                    s1[j].className = '';
                }
                s1[this.index].className = 'current';
                }
            
        }
    </script>
</body>
</html>